﻿$(function(){
	var di = $('.nr > div');
	di.not(':first').hide();
	$('.botnav ul li:first').addClass('sel');
	$('.botnav ul li').each(function(index){
		$(this).mouseover(function(){
			$(this).siblings().removeClass('sel').end().addClass('sel');
			di.hide();
			$('.nr > div:eq('+index+')').show();
		})			
	})
})

$(function() {
	$("#list_introduce").click(function() {
		$("#wanwan_introduce").toggle();
	});	
})


$(function() {
	//写信
	$( "#dialog" ).dialog({
		autoOpen: false,
		width: 700,
		height: 500,
		buttons: [
			{
				text: "发送",
				click: function() {
					$("#dlg_write_letter").submit();
					$( this ).dialog( "close" );
				}
			},
			{
				text: "取消",
				click: function() {
					$( this ).dialog( "close" );
				}
			}
		]
	});
	
	$("#write_letter").click(function(){
		$( "#dialog" ).dialog("open");							  
	});
	
	//回信
	$( "#dlgReply" ).dialog({
		autoOpen: false,
		width: 700,
		height: 500,
		buttons: [
			{
				text: "发送",
				click: function() {
					$("#dlg_reply_letter").submit();
					$( this ).dialog( "close" );
				}
			},
			{
				text: "取消",
				click: function() {
					$( this ).dialog( "close" );
				}
			}
		]
	});
})